import React from 'react';
import { observer } from 'mobx-react';
import ReplyStore from '../../stores/reply';
import RightReplyContent from './rightReplyContent';
import { Spin } from 'antd';
import { WeaRightMenu } from "ecCom";
// const getLabel = WeaLocaleProvider.getLabel;

export interface RightReplyBaseProps {
    reply: ReplyStore;
    h: any;
}

@observer
export default class RightReplyBase extends React.Component<RightReplyBaseProps, any> {
    constructor(props) {
        super(props);
        const { reply } = this.props;
        reply.pagesize = 20;
        reply.total = 0;
        reply.pagecount = 0;
        reply.current = 1;
    }

    render() {
        const { reply, h } = this.props;
        return (
            <div style={{ height: "100%" }}>
                <WeaRightMenu  datas={[]}  showUrlItem={false}  >
                    <Spin spinning={reply.loading} >
                        <div className="cube-reply" style={{ height: h }}>
                            {
                                (reply && reply.showReply) && <RightReplyContent {...this.props} />
                            }
                        </div>
                    </Spin>
                </WeaRightMenu>
            </div >
        )
    }
}